﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Meraz.Core.Model
{
    public class TwitterGenre : IEquatable<TwitterStudy>, IXmlEntity, IComparable<TwitterGenre>
    {
        public string ID { get; set; }
        public string Name { get; set; }
        public int Sequence { get; set; }

        public override string ToString()
        {
            return Name;
        }
        public override bool Equals(object obj)
        {
            if (obj is TwitterGenre)
                return Equals((TwitterGenre)obj);

            return false;
        }
        public override int GetHashCode()
        {
            return ID.GetHashCode();
        }
        public bool Equals(TwitterStudy other)
        {
            if (other == null)
                return false;
            return ID.Equals(other.ID);
        }
        public int CompareTo(TwitterGenre other)
        {
            return Sequence.CompareTo(other.Sequence);
        }
    }
}
